package me.sunpeng.design.singleton.type8;

/**
 * @author sp
 */
public class SingletonTest08 {
    public static void main(String[] args) {
        Singleton instance = Singleton.INSTANCE;
        Singleton instance1 = Singleton.INSTANCE;
        System.out.println(instance == instance1);
    }
}

enum Singleton {
    //属性
    INSTANCE;

    public void sayOk() {
        System.out.println("ok~");
    }
}